<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数组扩展</title>
</head>
<body>
    <div></div>
    <div></div>
    <div></div>
    <script>
        //Array.from  用来通过一个可迭代的数据, 创建数组
        // let arr = Array.from('iloveyou');
        // let divs = document.querySelectorAll('div');
        // // let arr = Array.from(divs);
        // let arr = [...divs];
        // console.log(arr);
        
        //Array.of
        // let arr = Array.of(1,2,3,4,5,'abc'); // 
        // console.log(arr);
       
        //Array.prototype.fill   fill 填充
        // let arr = new Array(10);
        // let arr = ['a','b','c'];
        // arr.fill(1);
        // console.log(arr);

        //Array.prototype.copyWithin
        // let arr = [1,2,3,4,5,6,7,8,9];
        // let res = arr.copyWithin(0, 5, 8);
        // console.log(res);

    </script>
</body>
</html>